<?php

namespace common\entities\myhtsq;

use Yii;

/**
 * This is the model class for table "myscrm_contract_payment".
 *
 * @property string $payment_id
 * @property string $contract_id
 * @property string $finance_code
 * @property string $register_date
 * @property string $payment_amount
 * @property string $payment_date
 * @property string $payment_code
 * @property string $receivables_account
 * @property string $receivables_account_name
 * @property string $payment_account_name
 * @property string $remark
*  @property string $input_date
 * @property string $created_on
 * @property string $created_by
 * @property string $modified_on
 * @property string $modified_by
 */
class ContractPaymentEntity extends \common\entities\ConfigEntity
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'myscrm_contract_payment';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['register_date', 'payment_date', 'created_on', 'modified_on','input_date'], 'safe'],
            [['payment_amount'], 'number'],
            [['remark'], 'string'],
            [['pay_way'], 'string'],
            [['DhkGUID', 'payment_id', 'contract_id', 'created_by', 'modified_by'], 'string', 'max' => 36],
            [['finance_code', 'payment_code', 'receivables_account'], 'string', 'max' => 50],
            [['receivables_account_name', 'payment_account_name'], 'string', 'max' => 100]
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'DhkGUID' => '待回款ID',
            'payment_id' => '回款ID',
            'contract_id' => '合同ID',
            'finance_code' => '财务编号',
            'register_date' => '登记时间',
            'payment_amount' => '实收总额',
            'payment_date' => '实收时间',
            'input_date' => '款项归档时间',
            'payment_code' => '实收款编号',
            'receivables_account' => '收款账户',
            'receivables_account_name' => '收款账户',
            'payment_account_name' => '付款客户名称',
            'remark' => '备注',
            'created_on' => '创建时间',
            'created_by' => '创建人',
            'modified_on' => '修改时间',
            'modified_by' => '修改人'
        ];
    }
}
